package org.example.mapper;


import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.example.bean.Ptype;

import java.util.List;

public interface PtypeDao {
    public List<Ptype>list();
    @Delete("DELETE FROM `ptype`WHERE id =#{id}")
    public Void del(int id);
    @Insert("INSERT INTO ptype(name)VALUES(#{name})")
    public void add(Ptype ptype);
    @Update("UPDATE ptype SET `name`=#{name}WHERE id=#{id}")
    public void update(Ptype ptype);
}
